package com.ldk.framework.dao;

import java.util.List;
import java.util.Map;

import org.springframework.data.domain.Pageable;

import com.ldk.base.framework.dao.IBaseDAO;
import com.ldk.framework.entity.ServiceTrip;
/**
* ServiceTripDAO接口类
* @author xiangwl
*/
public interface IServiceTripDAO extends IBaseDAO<ServiceTrip> {
	/**
	 * 根据起点经纬度和目的地点经纬度搜索相似的司机行程
	 * @param dbKey
	 * @param parms {serviceCode,userType,status,roadId,startLon,startLat,endLon,endLat,scope,goTime,carRank,carSeats}
	 * @return
	 */
	List<ServiceTrip> searchTripList(String dbKey, Map<String, Object> parms, Pageable pageable);
	
	/**
	 * 根据行程单号查询行程列表
	 * @param dbKey
	 * @param query
	 * @param tripNoList
	 * @return
	 */
	List<ServiceTrip> selectListIn(String dbKey, ServiceTrip query, List<String> tripNoList);
	
	/**
	 * 根据行程单号批量修改行程信息，ps:主要用于统一修改行程状态
	 * @param dbKey
	 * @param entity
	 * @param orderNoList
	 * @return
	 */
	int updateIn(String dbKey, ServiceTrip entity, List<String> tripNoList);
	/**
	 * 获取用户每天取消行程数
	 * @param dbKey
	 * @param query
	 * @return
	 */
	long getDayCancelCount(String dbKey, ServiceTrip query);
}
